package th;

/**
 * @author Mark
 * @version 1.0
 * @date 2020/5/17 22:44
 * @description 实现Runnale接口
 */
public class ThreadRunnable implements Runnable {

    public static void main(String[] args) {
        ThreadTest threadTest = new ThreadTest();
        new Thread(threadTest).start();

        for (int i = 0; i < 2000; i++) {
            System.out.println("main线程");

        }
    }

    @Override
    public void run() {
        // run方法
        for (int i = 0; i < 20; i++) {
            System.out.println("学习线程");

        }
    }


}
